package com.codrim.cs.data.server.dao.entity;

import com.codrim.common.utils.bean.BeanUtils;
import com.codrim.cs.data.rpc.dto.result.OfferReportDataDTO;

import lombok.Data;

/**
 * @author Liang.zhuge
 */
@Data
public class MergeDayStatCsGeneralDO {
    private String sdates;
    private Integer advertiserId;
    private Integer affiliateId;
    private Integer offerId;
    private Integer customerId;
    private Integer advAffiliateManagerId;
    private Integer advAdvertiserManagerId;
    private Integer affAdvertiserManagerId;

    private String symbol;

    private String sourceId;
    private String sub1;
    private String sub2;
    private String sub3;
    private String sub4;
    private String sub5;

    private Long clicks;
    private Long uniqueClicks;
    private Long grossConversions;
    private Long scrubbedConversions;
    private Long conversions;
    private Float revenue;
    private Float cost;
    private Long caps;

    private Integer accessType;

    public OfferReportDataDTO toOfferReportDataDTO() {
        return BeanUtils.copyProperties(this, OfferReportDataDTO.class);
    }

    public static MergeDayStatCsGeneralDO constructBySymbolRMB(){
        MergeDayStatCsGeneralDO mergeDayStatCsGeneralDO = new MergeDayStatCsGeneralDO();
        mergeDayStatCsGeneralDO.setSymbol("¥");
        mergeDayStatCsGeneralDO.setClicks(0L);
        mergeDayStatCsGeneralDO.setUniqueClicks(0L);
        mergeDayStatCsGeneralDO.setGrossConversions(0L);
        mergeDayStatCsGeneralDO.setScrubbedConversions(0L);
        mergeDayStatCsGeneralDO.setConversions(0L);
        mergeDayStatCsGeneralDO.setRevenue(0F);
        mergeDayStatCsGeneralDO.setCost(0F);
        mergeDayStatCsGeneralDO.setCaps(0L);
        return mergeDayStatCsGeneralDO;
    }

    public static MergeDayStatCsGeneralDO constructBySymbolDoller(){
        MergeDayStatCsGeneralDO mergeDayStatCsGeneralDO = new MergeDayStatCsGeneralDO();
        mergeDayStatCsGeneralDO.setSymbol("$");
        mergeDayStatCsGeneralDO.setClicks(0L);
        mergeDayStatCsGeneralDO.setUniqueClicks(0L);
        mergeDayStatCsGeneralDO.setGrossConversions(0L);
        mergeDayStatCsGeneralDO.setScrubbedConversions(0L);
        mergeDayStatCsGeneralDO.setConversions(0L);
        mergeDayStatCsGeneralDO.setRevenue(0F);
        mergeDayStatCsGeneralDO.setCost(0F);
        mergeDayStatCsGeneralDO.setCaps(0L);
        return mergeDayStatCsGeneralDO;
    }
}
